home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / DTS.Lib / DTS.Lib.headers / PICTControl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-12  |  3.8 KB  |  88 lines  |  [TEXT/MPS ]

  1. #ifndef __PICTCONTROL__
  2. #define __PICTCONTROL__
  3.  
  4. #ifndef __TYPES__
  5. #include <Types.h>
  6. #endif
  7.  
  8. #ifndef __CONTROLS__
  9. #include <Controls.h>
  10. #endif
  11.  
  12. #ifndef __WINDOWS__
  13. #include <Windows.h>
  14. #endif
  15.  
  16. ControlHandle    CPICTNew(WindowPtr window, Rect *r, StringPtr title, Boolean vis, short val,
  17.                          short min, short max, short viewID, short refcon);
  18.     /*
  19.     **    ¶ Create a new 'PICT' control.
  20.     **
  21.     **    INPUT:    window            The window to add the control to
  22.     **            r                The bounding rect of the control being added
  23.     **            title            The title of the control being added (don't pass in nil here)
  24.     **            vis                True if control should be created initially visible
  25.     **            val                Initial value for the contrlValue field of the control
  26.     **            val                Initial value for the contrlMin field of the control
  27.     **            val                Initial value for the contrlMax field of the control
  28.     **            viewID            Normally rPICTCtl, as that is the standard AppsToGo
  29.     **                            resource ID for this control, but you may wish to have
  30.     **                            the CDEF have a different resource id #.
  31.     **            refcon            Initial value for the contrlRfCon field of the control
  32.     **    RESULT:    ControlHandle    The control handle of the created control, or nil if
  33.     **                            the control could not be created.
  34.     **
  35.     **    Create a new PICT control.  All the parameters are what you would expect for creating
  36.     **    a new control.
  37.     **            Variants:
  38.     **                +1:    Sticky buttons.  (Can't be tracked off of once clicked on.)
  39.     **                +2:    Draw offscreen.  This is important if the control has a title and
  40.     **                    you don't want flashing.
  41.     **                +4:    Size control to PICT.  This saves you the trouble of setting the
  42.     **                    bounding box of the control to the size of the PICT.  Note that
  43.     **                    the control is simply created based on the bounding rect of the PICT,
  44.     **                    instead of the control.
  45.     **                +8:    Draw the control title in srcOr mode after drawing the PICT.  This allows
  46.     **                    you to easily add text to a PICT control, not to mention change the
  47.     **                    text while the application is running. */
  48.  
  49. ControlHandle    CPICTNext(WindowPtr window, ControlHandle ctl, short dir, Boolean justActive);
  50.     /*
  51.     **    ¶ Iterate to the 'next' PICT control.
  52.     **
  53.     **    INPUT:    window            The window who's control list is to be searched
  54.     **            ctl                The control at which to start the search
  55.     **                            (Pass in nil to start at the beginning of the control list.)
  56.     **            dir                The direction of the search (1 or -1).  Note that the meaning
  57.     **                            of the beginning of the control list changes if -1 is passed in.
  58.     **                            The beginning of the control list to search is actually the
  59.     **                            last control in the window's control list if -1 is used.
  60.     **            justActive        If true, only find CPICT controls that are active.
  61.     **                            (Active is defined as contrlHilite != 255).
  62.     **    OUTPUT:    ControlHandle    Handle of PICT found.  If nil is returned, no more to
  63.     **                            be found meeting criteria.
  64.     **
  65.     **    Return the next PICT control from a window's control list. 
  66.     **
  67.     **    To get the first control in the window's control list, pass in a nil for ctl.
  68.     **    Pass in either 1 or -1 for the direction of the search.  Passing in a 1 means to
  69.     **    return the control just after the one passed in (or the first one if nil is passed in).
  70.     **    Passing in a -1 means to return the control just prior to the one passed in (or the
  71.     **    last control if nil is passed in).  If there are no more controls, then nil is returned.
  72.     **    The justActive field indicates if you want to return only visible, active controls.
  73.     **    If false is passed in, then the next control is returned, independent of state.
  74.     **    If true is passed in, then the next visible, active control is returned. */
  75.  
  76. Boolean            IsPICTCtl(ControlHandle ctl);
  77.     /*
  78.     **    ¶ Check if the control is a 'PICT' control.
  79.     **
  80.     **    INPUT:    ctl            Handle of control to test to see if it is a PICT control.
  81.     **    RESULT:    Boolean        True if control is a PICT control.
  82.     **
  83.     **    Check to see if the control is a PICT control. */
  84.  
  85.  
  86. #endif
  87.  
  88.